<?php

class Application_Model_Profile extends Application_Model_DomainObject{
    
    protected $_id;//序号
    
    protected $_home;
    
    protected $_nickName;

    protected $_name;
    
    protected $_address;
    
    protected $_lang;
    
    protected $_birthday;
    
    protected $_sex;
    
    protected $_description;
    
    protected $_email;
    
    protected $_qq;
    
    protected $_tel;
    
    protected $_userId;


    /**
     * 
     * @return \Application_Model_DbTable_Profile 
     */
    public static function getDb(){
        return new Application_Model_DbTable_Profile();
    }

    /**
     * 
     * @param int $userId
     * @return Application_Model_Profile 
     */
    public static function getByUserId($userId){
        return Application_Model_Profile::getDb()->queryOne(array('userId'=>$userId));
    }
}